package controller

import (
	"github.com/gin-gonic/gin"
	"openeuler.org/PilotGo/PilotGo-plugin-automation/internal/module/resources/service"
	"openeuler.org/PilotGo/PilotGo-plugin-automation/pkg/response"
)

func GetResourceHosts(c *gin.Context) {
	hosts, err := service.GetResourceHosts()
	if err != nil {
		response.Fail(c, nil, err.Error())
		return
	}
	response.Success(c, hosts, "success")
}
